package cn.lili.controller.feign.message;

import cn.lili.modules.member.client.ShortLinkClient;
import cn.lili.modules.message.entity.dos.ShortLink;
import cn.lili.modules.message.service.ShortLinkService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 短链接 feign client
 *
 * @author Chopper
 * @version v1.0
 * 2021-12-07 08:24
 */
@RestController
@RequiredArgsConstructor
public class ShortLinkFeignController implements ShortLinkClient {
    private final ShortLinkService shortLinkService;


    @Override
    public void save(ShortLink shortLink) {
        shortLinkService.save(shortLink);
    }

    @Override
    public ShortLink getById(String id) {
        return shortLinkService.getById(id);
    }

    @Override
    public List<ShortLink> queryShortLinks(ShortLink shortLink) {
        return shortLinkService.queryShortLinks(shortLink);
    }
}
